package com.biscuit.page.basicservice.persistence.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.biscuit.page.basicservice.api.model.request.chat.ChatRoomMessagePageAReq;
import com.biscuit.page.basicservice.api.model.response.chat.ChatRoomMessageAResp;
import com.biscuit.page.basicservice.model.entities.mysql.SysChatRoomMessage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author biscuit
 * @createTime 2024/6/11 10:02
 */
@Mapper
public interface ChatRoomMessageMapper extends BaseMapper<SysChatRoomMessage> {

    List<ChatRoomMessageAResp> selectListByChatRoomId(@Param("req") ChatRoomMessagePageAReq req, @Param("offset") int offset);

    int selectListTotalByChatRoomId(@Param("req") ChatRoomMessagePageAReq req);

    void insertAndIncrement(@Param("data") SysChatRoomMessage data);

}
